using UnityEngine;
using System.Collections;

public class MainMenu : MonoBehaviour 
{
	
	#region Fields
	public Texture backgroundTexture;
	
	private string instructionText = "Instructions:\nPress Left and Right Arrows to move.\nPress Spacebar to fire.";
	private int instructionWidth = 250;
	private int instructionHeight = 200;
	#endregion
	
	#region Properties
	#endregion
	
	#region Functions
	
	// Update the UI
	void OnGUI () 
	{
		GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), backgroundTexture);
		GUI.Label(new Rect(10, 10, instructionWidth, instructionHeight), instructionText);
		
		// Create the button and check if the button has been clicked
		//if(GUI.Button(new Rect(Screen.width/2 - buttonWidth/2, 
		//	                Screen.height/2 - buttonHeight/2, 
		//					buttonWidth, buttonHeight), "Start Game"))
		//{
			
		//}
		
		if (Input.anyKeyDown)
		{
			// Load the level with the next index (Level 1)
			Application.LoadLevel(GameConstants.GAME);
		}
		
	}
	
	#endregion
}
